Integrand size = 25, antiderivative size = 148 \[ \int \frac {1}{(3+3 \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx=-\frac {2 d (2 c+d) \arctan \left (\frac {d+c \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )}{3 (c-d) \left (c^2-d^2\right )^{3/2} f}-\frac {d (c+2 d) \cos (e+f x)}{3 (c-d)^2 (c+d) f (c+d \sin (e+f x))}-\frac {\cos (e+f x)}{(c-d) f (3+3 \sin (e+f x)) (c+d \sin (e+f x))} \]
[Out]
Time = 0.25 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.01, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {2847, 2833, 12, 2739, 632, 210} \[ \int \frac {1}{(3+3 \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx=-\frac {2 d (2 c+d) \arctan \left (\frac {c \tan \left (\frac {1}{2} (e+f x)\right )+d}{\sqrt {c^2-d^2}}\right )}{a f (c-d) \left (c^2-d^2\right )^{3/2}}-\frac {d (c+2 d) \cos (e+f x)}{a f (c-d)^2 (c+d) (c+d \sin (e+f x))}-\frac {\cos (e+f x)}{f (c-d) (a \sin (e+f x)+a) (c+d \sin (e+f x))} \]
[In]
[Out]
Rule 12
Rule 210
Rule 632
Rule 2739
Rule 2833
Rule 2847
Rubi steps \begin{align*} \text {integral}& = -\frac {\cos (e+f x)}{(c-d) f (a+a \sin (e+f x)) (c+d \sin (e+f x))}+\frac {d \int \frac {-2 a+a \sin (e+f x)}{(c+d \sin (e+f x))^2} \, dx}{a^2 (c-d)} \\ & = -\frac {d (c+2 d) \cos (e+f x)}{a (c-d)^2 (c+d) f (c+d \sin (e+f x))}-\frac {\cos (e+f x)}{(c-d) f (a+a \sin (e+f x)) (c+d \sin (e+f x))}-\frac {d \int \frac {a (2 c+d)}{c+d \sin (e+f x)} \, dx}{a^2 (c-d)^2 (c+d)} \\ & = -\frac {d (c+2 d) \cos (e+f x)}{a (c-d)^2 (c+d) f (c+d \sin (e+f x))}-\frac {\cos (e+f x)}{(c-d) f (a+a \sin (e+f x)) (c+d \sin (e+f x))}-\frac {(d (2 c+d)) \int \frac {1}{c+d \sin (e+f x)} \, dx}{a (c-d)^2 (c+d)} \\ & = -\frac {d (c+2 d) \cos (e+f x)}{a (c-d)^2 (c+d) f (c+d \sin (e+f x))}-\frac {\cos (e+f x)}{(c-d) f (a+a \sin (e+f x)) (c+d \sin (e+f x))}-\frac {(2 d (2 c+d)) \text {Subst}\left (\int \frac {1}{c+2 d x+c x^2} \, dx,x,\tan \left (\frac {1}{2} (e+f x)\right )\right )}{a (c-d)^2 (c+d) f} \\ & = -\frac {d (c+2 d) \cos (e+f x)}{a (c-d)^2 (c+d) f (c+d \sin (e+f x))}-\frac {\cos (e+f x)}{(c-d) f (a+a \sin (e+f x)) (c+d \sin (e+f x))}+\frac {(4 d (2 c+d)) \text {Subst}\left (\int \frac {1}{-4 \left (c^2-d^2\right )-x^2} \, dx,x,2 d+2 c \tan \left (\frac {1}{2} (e+f x)\right )\right )}{a (c-d)^2 (c+d) f} \\ & = -\frac {2 d (2 c+d) \arctan \left (\frac {d+c \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )}{a (c-d)^2 (c+d) \sqrt {c^2-d^2} f}-\frac {d (c+2 d) \cos (e+f x)}{a (c-d)^2 (c+d) f (c+d \sin (e+f x))}-\frac {\cos (e+f x)}{(c-d) f (a+a \sin (e+f x)) (c+d \sin (e+f x))} \\ \end{align*}
Time = 0.42 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.09 \[ \int \frac {1}{(3+3 \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx=\frac {\cos (e+f x) \left (\frac {2 d (2 c+d) \text {arctanh}\left (\frac {\sqrt {c-d} \sqrt {1-\sin (e+f x)}}{\sqrt {-c-d} \sqrt {1+\sin (e+f x)}}\right )}{\sqrt {-c-d} (c-d)^{3/2} \sqrt {\cos ^2(e+f x)}}+\frac {c+2 d}{(c-d) (1+\sin (e+f x))}-\frac {d}{(1+\sin (e+f x)) (c+d \sin (e+f x))}\right )}{3 (-c+d) (c+d) f} \]
[In]
[Out]
Time = 1.18 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.04
method | result | size |
derivativedivides | \(\frac {-\frac {2}{\left (c -d \right )^{2} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}-\frac {2 d \left (\frac {\frac {d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\left (c +d \right ) c}+\frac {d}{c +d}}{\left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) c +2 d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+c}+\frac {\left (2 c +d \right ) \arctan \left (\frac {2 c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 d}{2 \sqrt {c^{2}-d^{2}}}\right )}{\left (c +d \right ) \sqrt {c^{2}-d^{2}}}\right )}{\left (c -d \right )^{2}}}{f a}\) | \(154\) |
default | \(\frac {-\frac {2}{\left (c -d \right )^{2} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}-\frac {2 d \left (\frac {\frac {d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\left (c +d \right ) c}+\frac {d}{c +d}}{\left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) c +2 d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+c}+\frac {\left (2 c +d \right ) \arctan \left (\frac {2 c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 d}{2 \sqrt {c^{2}-d^{2}}}\right )}{\left (c +d \right ) \sqrt {c^{2}-d^{2}}}\right )}{\left (c -d \right )^{2}}}{f a}\) | \(154\) |
risch | \(-\frac {2 \left (-2 i c d \,{\mathrm e}^{2 i \left (f x +e \right )}-i d^{2} {\mathrm e}^{2 i \left (f x +e \right )}+i c d +2 i d^{2}+2 c^{2} {\mathrm e}^{i \left (f x +e \right )}+3 d \,{\mathrm e}^{i \left (f x +e \right )} c +d^{2} {\mathrm e}^{i \left (f x +e \right )}\right )}{\left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) \left (c +d \right ) \left (-i d \,{\mathrm e}^{2 i \left (f x +e \right )}+i d +2 c \,{\mathrm e}^{i \left (f x +e \right )}\right ) f \left (c -d \right )^{2} a}-\frac {2 d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c \sqrt {-c^{2}+d^{2}}+c^{2}-d^{2}}{\sqrt {-c^{2}+d^{2}}\, d}\right ) c}{\sqrt {-c^{2}+d^{2}}\, \left (c +d \right ) \left (c -d \right )^{2} f a}-\frac {d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c \sqrt {-c^{2}+d^{2}}+c^{2}-d^{2}}{\sqrt {-c^{2}+d^{2}}\, d}\right )}{\sqrt {-c^{2}+d^{2}}\, \left (c +d \right ) \left (c -d \right )^{2} f a}+\frac {2 d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c \sqrt {-c^{2}+d^{2}}-c^{2}+d^{2}}{\sqrt {-c^{2}+d^{2}}\, d}\right ) c}{\sqrt {-c^{2}+d^{2}}\, \left (c +d \right ) \left (c -d \right )^{2} f a}+\frac {d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c \sqrt {-c^{2}+d^{2}}-c^{2}+d^{2}}{\sqrt {-c^{2}+d^{2}}\, d}\right )}{\sqrt {-c^{2}+d^{2}}\, \left (c +d \right ) \left (c -d \right )^{2} f a}\) | \(482\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 515 vs. \(2 (145) = 290\).
Time = 0.33 (sec) , antiderivative size = 1120, normalized size of antiderivative = 7.57 \[ \int \frac {1}{(3+3 \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx=\text {Too large to display} \]
[In]
[Out]
Timed out. \[ \int \frac {1}{(3+3 \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx=\text {Timed out} \]
[In]
[Out]
Exception generated. \[ \int \frac {1}{(3+3 \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 298 vs. \(2 (145) = 290\).
Time = 0.32 (sec) , antiderivative size = 298, normalized size of antiderivative = 2.01 \[ \int \frac {1}{(3+3 \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx=-\frac {2 \, {\left (\frac {{\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (c\right ) + \arctan \left (\frac {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + d}{\sqrt {c^{2} - d^{2}}}\right )\right )} {\left (2 \, c d + d^{2}\right )}}{{\left (a c^{3} - a c^{2} d - a c d^{2} + a d^{3}\right )} \sqrt {c^{2} - d^{2}}} + \frac {c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 3 \, c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + c^{3} + c^{2} d + c d^{2}}{{\left (a c^{4} - a c^{3} d - a c^{2} d^{2} + a c d^{3}\right )} {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2 \, d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + c\right )}}\right )}}{f} \]
[In]
[Out]
Time = 8.93 (sec) , antiderivative size = 309, normalized size of antiderivative = 2.09 \[ \int \frac {1}{(3+3 \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx=-\frac {\frac {2\,\left (c^2+c\,d+d^2\right )}{\left (c+d\right )\,{\left (c-d\right )}^2}+\frac {2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (d^2+2\,c\,d\right )}{c\,{\left (c-d\right )}^2}+\frac {2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (c^3+c^2\,d+d^3\right )}{c\,\left (c+d\right )\,{\left (c-d\right )}^2}}{f\,\left (a\,c\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+\left (a\,c+2\,a\,d\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+\left (a\,c+2\,a\,d\right )\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+a\,c\right )}-\frac {2\,d\,\mathrm {atan}\left (\frac {\frac {d\,\left (2\,c+d\right )\,\left (2\,a\,c^3\,d-2\,a\,c^2\,d^2-2\,a\,c\,d^3+2\,a\,d^4\right )}{a\,{\left (c+d\right )}^{3/2}\,{\left (c-d\right )}^{5/2}}+\frac {2\,c\,d\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (2\,c+d\right )\,\left (a\,c^3-a\,c^2\,d-a\,c\,d^2+a\,d^3\right )}{a\,{\left (c+d\right )}^{3/2}\,{\left (c-d\right )}^{5/2}}}{2\,d^2+4\,c\,d}\right )\,\left (2\,c+d\right )}{a\,f\,{\left (c+d\right )}^{3/2}\,{\left (c-d\right )}^{5/2}} \]
[In]
[Out]